#include "MapFileReader.h"

MapFileReader::MapFileReader(char* str): filename(str){
	ifstream infile(filename, ios::in);

	// read infile and instantiate MapField with each line then push it into the mapvec vector
	while (!infile.eof()){
		string temp;
		getline(infile, temp);
		if (temp.compare("") != 0){
			mapvec.push_back(new MapField(temp));
		}
	}

	sort(mapvec.begin(),mapvec.end(),mapvec_comp());

}